home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 7
/
Apprentice-Release7.iso
/
Environments
/
Small Eiffel 0.4.8
/
lib_rand
/
demo1.e
next >
Wrap
Text File
|
1997-04-13
|
847b
|
42 lines
-- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C)
-- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
--
class DEMO1
creation make
feature
make is
local
std_rand: MIN_STAND;
count, range, column: INTEGER;
do
io.put_string("Using the MIN_STAND random number generator.%N%
%How many numbers ? ");
io.read_integer;
count := io.last_integer;
io.put_string("Range ( > 1) ? ");
io.read_integer;
range := io.last_integer;
from
!!std_rand.make;
until
count = 0
loop
std_rand.next;
io.put_integer(std_rand.last_integer(range));
count := count - 1;
if column = 6 then
io.put_string("%N");
column := 0;
else
column := column + 1;
io.put_string("%T");
end;
end;
io.put_string("%N");
end;
end -- DEMO1